/*
 * @Author: LVGRAPE
 * @Date: 2023-09-07 17:59:27
 * @LastEditTime: 2023-09-13 09:25:28
 * @LastEditors: LVGRAPE
 * @Description:
 * @FilePath: \ZINO_FC_V4\ZINO\hardware\spi_bus\spi_bus.c
 * 要啥没啥，爱咋咋的
 */
#include <rtdevice.h>
#include "drv_spi.h"
#include "zino.h"
#define DBG_TAG "spi_bus"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>

int zino_spi_bus_init(void)
{
    LOG_I("adding spi bus:");
    if (rt_hw_spi_device_attach("spi1", "spi_nrf", GPIOC, GPIO_PINS_12) != RT_EOK)
    {
        LOG_E("spi1 si24r1 attach failed!");

    }
    else
    {
        LOG_I("spi1 si24r1 attach success!");
    }

    return RT_EOK;
}

ZINO_APP_EXPORT(zino_spi_bus_init);